<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>NEG Instruction</title>
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1 class="heading">NEG Instruction<BR>
</h1>
<hr noshade></h1>
<BR>
<span class="text">The instruction NEG returns the twos complement of an operand given as an effective address.<BR>
<BR>
ADDRESS METHODS: Dn, (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l<BR>
<BR>
DATA LENGTH: Byte, word, longword</span>
    <TABLE border=0 cellPadding=0 cellSpacing=0 width="72%">
  <TBODY>
    <TR>
      <TD width="27%" rowSpan=5 vAlign=top class="text">FLAGS:</TD>
      <TD width="73%" class="text">X - Clear if the result is zero, otherwise it is set.</TD>
    </TR>
    <TR>
      <TD width="73%" class="text">N - S</TD>
    </TR>
    <TR>
      <TD width="73%" class="text">Z - S</TD>
    </TR>
    <TR>
      <TD width="73%" class="text">C - Same as X</TD>
    </TR>
    <TR>
      <TD width="73%" class="text">V - S</TD>
    </TR>
  </TBODY>
</TABLE>
<P><span class="text">SYNTAX: NEG &lt;ea&gt;<BR>
</span></P>
<P><span class="text">EXAMPLE CODE:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></P>
<P class="sourcecode"><span class="text">&nbsp;&nbsp; NEG&nbsp;&nbsp;&nbsp; D0.W&nbsp;&nbsp;&nbsp; 
 
if D0 contained 2, D0 would become 0000FFFE</span></P>
<span class="text"><BR>
</span><span class="text"><BR>
</span><span class="text"><BR>
</span><span class="text"><BR>
</span><span class="text">
</span>
</body>
</html>